home *** CD-ROM | disk | FTP | other *** search
- //========================================================================================
- //
- // Viwer description for 'FWmb' (ODF menu bar) resources
- //
- // Author: Steve Crutchfield
- //
- // Copyright: (c) 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- //----------------------------------------------------------------------------
- // Definitions for useful script and language code pop-up menus.
- // (If ResEdit supported an #include mechanism, this could be
- // shared among serveral resource types.)
- //----------------------------------------------------------------------------
-
- DeclareNamedStatement("ScriptCode")
- Margin(0, 2, 0, 0)
- IntegerPopup("Script:", 53, fScriptCode, Alignment = Left)
- {
- IntItem("Roman", 0);
- IntItem("System script", -1);
- IntItem("Current script", -2);
- IntItem("Japanese", 1);
- IntItem("Traditional Chinese", 2);
- IntItem("Korean", 3);
- IntItem("Arabic", 4);
- IntItem("Hebrew", 5);
- IntItem("Greek", 6);
- IntItem("Cyrillic", 7);
- IntItem("Right/Left Symbols", 8);
- IntItem("Devanagari", 9);
- IntItem("Gurmukhi", 10);
- IntItem("Gujarati", 11);
- IntItem("Oriya", 12);
- IntItem("Bengali", 13);
- IntItem("Tamil", 14);
- IntItem("Telugu", 15);
- IntItem("Kannada", 16);
- IntItem("Malayalam", 17);
- IntItem("Sinhalese", 18);
- IntItem("Burmese", 19);
- IntItem("Khmer", 20);
- IntItem("Thai", 21);
- IntItem("Laotian", 22);
- IntItem("Georgian", 23);
- IntItem("Armenian", 24);
- IntItem("Simplified Chinese", 25);
- IntItem("Tibetan", 26);
- IntItem("Mongolian", 27);
- IntItem("Geez/Ethiopic", 28);
- IntItem("East European Roman", 29);
- IntItem("Vietnamese", 30);
- IntItem("Extended Arabic", 31);
- IntItem("Uninterpreted Symbols", 32);
- };
-
- DeclareNamedStatement("LanguageCode")
- Margin(0, 2, 0, 0)
- IntegerPopup("Language:", 53, fLanguageCode, Alignment = Left)
- {
- IntItem("English", 0);
- IntItem("French", 1);
- IntItem("German", 2);
- IntItem("Italian", 3);
- IntItem("Dutch", 4);
- IntItem("Swedish", 5);
- IntItem("Spanish", 6);
- IntItem("Danish", 7);
- IntItem("Portuguese", 8);
- IntItem("Norwegian", 9);
- IntItem("Hebrew", 10);
- IntItem("Japanese", 11);
- IntItem("Arabic", 12);
- IntItem("Finnish", 13);
- IntItem("Greek", 14);
- IntItem("Icelandic", 15);
- IntItem("Maltese", 16);
- IntItem("Turkish", 17);
- IntItem("Croatian", 18);
- IntItem("TradChinese", 19);
- IntItem("Urdu", 20);
- IntItem("Hindi", 21);
- IntItem("Thai", 22);
- IntItem("Korean", 23);
- IntItem("Lithuanian", 24);
- IntItem("Polish", 25);
- IntItem("Hungarian", 26);
- IntItem("Estonian", 27);
- IntItem("Lettish", 28);
- IntItem("Latvian", 28);
- IntItem("Lapponian", 29);
- IntItem("Lappish", 29);
- IntItem("Faeroese", 30);
- IntItem("Farsi", 31);
- IntItem("Persian", 31);
- IntItem("Russian", 32);
- IntItem("SimpChinese", 33);
- IntItem("Flemish", 34);
- IntItem("Irish", 35);
- IntItem("Albanian", 36);
- IntItem("Romanian", 37);
- IntItem("Czech", 38);
- IntItem("Slovak", 39);
- IntItem("Slovenian", 40);
- IntItem("Yiddish", 41);
- IntItem("Serbian", 42);
- IntItem("Macedonian", 43);
- IntItem("Bulgarian", 44);
- IntItem("Ukrainian", 45);
- IntItem("Byelorussian", 46);
- IntItem("Uzbek", 47);
- IntItem("Kazakh", 48);
- IntItem("Azerbaijani", 49);
- IntItem("AzerbaijanAr", 50);
- IntItem("Armenian", 51);
- IntItem("Georgian", 52);
- IntItem("Moldavian", 53);
- IntItem("Kirghiz", 54);
- IntItem("Tajiki", 55);
- IntItem("Turkmen", 56);
- IntItem("Mongolian", 57);
- IntItem("MongolianCyr", 58);
- IntItem("Pashto", 59);
- IntItem("Kurdish", 60);
- IntItem("Kashmiri", 61);
- IntItem("Sindhi", 62);
- IntItem("Tibetan", 63);
- IntItem("Nepali", 64);
- IntItem("Sanskrit", 65);
- IntItem("Marathi", 66);
- IntItem("Bengali", 67);
- IntItem("Assamese", 68);
- IntItem("Gujarati", 69);
- IntItem("Punjabi", 70);
- IntItem("Oriya", 71);
- IntItem("Malayalam", 72);
- IntItem("Kannada", 73);
- IntItem("Tamil", 74);
- IntItem("Telugu", 75);
- IntItem("Sinhalese", 76);
- IntItem("Burmese", 77);
- IntItem("Khmer", 78);
- IntItem("Lao", 79);
- IntItem("Vietnamese", 80);
- IntItem("Indonesian", 81);
- IntItem("Tagalog", 82);
- IntItem("MalayRoman", 83);
- IntItem("MalayArabic", 84);
- IntItem("Amharic", 85);
- IntItem("Tigrinya", 86);
- IntItem("Galla", 87);
- IntItem("Oromo", 87);
- IntItem("Somali", 88);
- IntItem("Swahili", 89);
- IntItem("Ruanda", 90);
- IntItem("Rundi", 91);
- IntItem("Chewa", 92);
- IntItem("Malagasy", 93);
- IntItem("Esperanto", 94);
- IntItem("Welsh", 128);
- IntItem("Basque", 129);
- IntItem("Catalan", 130);
- IntItem("Latin", 131);
- IntItem("Quechua", 132);
- IntItem("Guarani", 133);
- IntItem("Aymara", 134);
- IntItem("Tatar", 135);
- IntItem("Uighur", 136);
- IntItem("Dzongkha", 137);
- IntItem("JavaneseRom", 138);
- IntItem("SundaneseRom", 139);
- IntItem("Unspecified", 32767);
- };
-
- DeclareNamedStatement("MenuHeader")
- Margin(5, 5, 0, 0)
- VList()
- {
- HList()
- {
- StaticText("Class tag: ", Width = 100);
- StaticText(fClassTag, Width = 50);
-
- StaticText("Object tag: ", Width = 100);
- StaticText(fObjectTag, Width = 50);
- }
-
- HList()
- {
- StaticText("Class ID: ", Width = 100);
- StaticText(fClassID, Width = 50);
-
- StaticText("Object ID: ", Width = 100);
- StaticText(fObjectID, Width = 50);
- }
-
- IntegerPopup("Label:", 53, fLabel, Alignment = Left)
- {
- IntItem("Pull-down menu", 'pdmn');
- };
-
- Spacer(Height = 3);
- }
-
- //----------------------------------------------------------------------------
- // ItemHeader and MenuHeader just represent the (slightly different)
- // archivable class data headers for items and pull-down menus;
- // they're isolated here for readability.
- //----------------------------------------------------------------------------
-
- DeclareNamedStatement("ItemHeader")
- Margin(5, 5, 0, 0)
- VList()
- {
- HList()
- {
- StaticText("Class tag: ", Width = 100);
- StaticText(fClassTag, Width = 50);
-
- StaticText("Object tag: ", Width = 100);
- StaticText(fObjectTag, Width = 50);
-
- StaticText("OwnerMenuClass: ", Width = 100);
- StaticText(fOwnerMenuClass, Width = 50);
- }
-
- HList()
- {
- StaticText("Class ID: ", Width = 100);
- StaticText(fClassID, Width = 50);
-
- StaticText("Object ID: ", Width = 100);
- StaticText(fObjectID, Width = 50);
-
- StaticText("OwnerMenuID: ", Width = 100);
- StaticText(fOwnerMenuID, Width = 50);
- }
-
- IntegerPopup("Label:", 53, fLabel, Alignment = Left)
- {
- IntItem("Text item", 'txit');
- IntItem("Separator", 'seit');
- IntItem("Toggle item", 'tgit');
- IntItem("Submenu", 'suit');
- };
-
- Spacer(Height = 7);
- }
-
- //----------------------------------------------------------------------------
- // The following statements correspond directly to the appropriate
- // ODFRC/EDL data structure.
- //----------------------------------------------------------------------------
-
- DeclareNamedStatement("TextItem")
- VList(Width = UseParent)
- {
- HList()
- {
- Spacer(Width = 5);
- EditText(fMenuKey, Label = "MenuKey:", LabelWidth = 50, Width = 100);
- Spacer(Width = 25);
- EditText(fCommandID, Label = "CommandID:", Width = 100);
- }
-
- HList()
- {
- Spacer(Width = 5);
- IncludeNamedStatement("ScriptCode");
- }
-
- HList()
- {
- Spacer(Width = 5);
- IncludeNamedStatement("LanguageCode");
- }
-
- Margin(5, 2, 0, 0)
- EditText(fTitle, Label = "Item Text:", LabelWidth = 50);
- }
-
- DeclareNamedStatement("ToggleItem")
- VList(Width = UseParent)
- {
- IncludeNamedStatement("TextItem");
-
- Spacer(Height = 5);
-
- DynamicVList(fAlternateItem, MenuItem)
- VList()
- {
- HList()
- {
- Spacer(Width = 5);
- IncludeNamedStatement("ScriptCode");
- }
-
- HList()
- {
- Spacer(Width = 5);
- IncludeNamedStatement("LanguageCode");
- }
-
- Margin(5, 2, 0, 0)
- EditText(fTitle, Label = "OtherText:", LabelWidth = 50);
- }
- }
-
- DeclareNamedStatement("SubMenu")
- VList(Width = UseParent)
- {
- Margin(5, 0, 0, 0)
- StaticText("Submenu:");
-
- DynamicVList(fSubMenu, SubMenu, Width = UseParent)
- Switch(fLabel)
- {
- case 'pdmn':
- SELF
-
- default:
- StaticText("### expected 'pdmn' here");
- }
- }
-
- DeclareNamedStatement("PullDownMenu")
- Margin(5, 5, 5, 20)
- VList(Width = UseParent)
- {
- IncludeNamedStatement("MenuHeader");
-
- Spacer(Height = 5);
-
- HList(Width = 350)
- {
- StaticText("Menu: ");
- EditText(fTitle);
- }
-
- Spacer(Height = 5);
-
- DynamicListMargin(fTitle, fItems, Width = UseParent)
- DynamicVList(fItems, Item, Width = UseParent)
- Margin(0, 2, 0, 2)
- Margin(5, 5, 5, 5, Single)
- VList(Width = UseParent)
- {
-
- HList()
- {
- StaticText("Item #");
- StaticText(ContextElementIndex);
- StaticText(": ");
- }
-
- IncludeNamedStatement("ItemHeader");
-
- Switch(fLabel)
- {
- case 'txit':
- IncludeNamedStatement("TextItem");
-
- case 'tgit':
- IncludeNamedStatement("ToggleItem");
-
- case 'seit':
- Margin(20, 5, 5, 5)
- StaticText("--- separator ---");
-
- case 'suit':
- IncludeNamedStatement("SubMenu");
-
- default:
- StaticText("### expected item class tag here");
- }
-
- Spacer(Height = 5);
- }
-
- Spacer(Height = 5);
- }
-
- DeclareNamedStatement("MenuBar")
- DynamicVList(fMenus, Menu, Width = UseParent)
- IncludeNamedStatement("PullDownMenu");
-
- //----------------------------------------------------------------------------
- // Main statement.
- //----------------------------------------------------------------------------
-
- Switch(fLabel)
- {
- case 'root':
- IncludeNamedStatement("MenuBar");
-
- case 'pdmn':
- IncludeNamedStatement("PullDownMenu");
-
- default:
- StaticText("### expected 'root' or 'pdmn' here");
- }
-